package sod.cl.rest.helper; 


import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.commons.configuration.reloading.FileChangedReloadingStrategy;
import org.apache.commons.configuration.reloading.InvariantReloadingStrategy;
import org.apache.struts.util.LabelValueBean;

public class Property { 
    private static Property instance = null;
    private static PropertiesConfiguration propConfig = null;
    
    public static Property getInstance(String propFile) throws ConfigurationException{
        if (instance == null) instance = new Property(propFile);
        return instance;
    }
    
    private Property(String propFile) throws ConfigurationException{
        propConfig = new PropertiesConfiguration(propFile);
        FileChangedReloadingStrategy relStr = new FileChangedReloadingStrategy();
        propConfig.setReloadingStrategy(relStr);
    }
    
    //SISTEMAS
    public static String getSISTEMA_ORIGEN() {
        return propConfig.getString("SISTEMA_ORIGE");
    }
    public static String getSISTEMA_DESTINO() {
        return propConfig.getString("SISTEMA_DESTINO");
    }
    //INI: JNDI BASE DE DATOS    
    public static String getMSG_TIPO() {
        return propConfig.getString("MSG_TIPO");
    }
    public static String getMSG_DOC() {
        return propConfig.getString("MSG_DOC");
    }
    public static String getQUEUE_NAME() {
        return propConfig.getString("QUEUE_NAME");
    }
    public static String getQUEUE_NAME_FACTORY() {
        return propConfig.getString("QUEUE_NAME_FACTORY");
    }
    public static String getJNDI_NAME_DTEFAC_GUIA() {
        return propConfig.getString("JNDI_NAME_DTEFAC_GUIA");
    }
     public static boolean getVALIDA_XML() {
        return propConfig.getBoolean("VALIDA_XML");
    }
    
    

} 
